<html>
<body>
<img id='m1' src=''>
<img id='m2' height='2' width='2'>
<canvas id='c1'></canvas>
<script>
  var im1=document.getElementById('m1');
  var im2=document.getElementById('m2');
  im2.src=im1.src;
  window.onload=function(){
    var ctx=document.getElementById('c1').getContext('2d');
    ctx.drawImage(im1, 0, 0);
    ctx.drawImage(im2, 0, 0);
  }
</script>
</body>
</html>